<template>
	<view>
		<u-swiper :list="list2" keyName="url" indicator circular :height="height" @click="navTo">
		</u-swiper>
	</view>
</template>

<script>
	export default {
		name:"swiper",
		data() {
			return {
				list:[]
			};
		},
		props:{
			height:{
				type:String,
				default:"220"
			}
		},
		computed:{
			list2() {
				if(this.swiperList.length) {
					let list = this.swiperList.map(item => {
						return {url:item.url,navTo:'../order/order'}
					})
					return list
				}
				return this.list
			}
		},
		methods:{
			navTo(index) {
				uni.navigateTo({
					url:this.list2[index].navTo
				})
			}
		},
	}
</script>

<style>

</style>
